package com.chinasoft.exam.service.Impl;

import com.chinasoft.exam.mapper.BrandMapper;
import com.chinasoft.exam.pojo.Brand;
import com.chinasoft.exam.service.BrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class BrandServiceImpl implements BrandService {

    @Autowired
    BrandMapper brandMapper;

    public void delete(Integer id) {
        brandMapper.delete1(id);
    }


    public void update(Brand brand) {
        brandMapper.update1(brand);

    }


    public List<Brand> selectAll() {
        return brandMapper.selectAll();
    }


    public boolean insert(Brand brand) {
        int ret = brandMapper.insert1(brand);
        if(ret!=-1)return true;
        else return false;
    }
}
